package top.tenebrous.yzl.tree;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * 树结构构建者
 * @author yazhang6
 */
public class TreeBuilder<E extends BaseTree, C> extends AbstractTreeBuilder<E, C> {

    private final List<C> list;



    public TreeBuilder(Collection<C> collection) {
        super();
        this.list = (List<C>) collection;
    }

    /**
     * 创建一个构建者，用于构建树结构
     */
    public Builder<C> newBuilder() {
        return Builder.build(list);
    }


}